<?php
namespace app\admin\controller;

use think\Db;

class Alliance extends Base
{
    public function config(){
        $list = Db::table('bze_config')
            ->where(['is_show'=>1,'location'=>5])
            ->order('sort')
            ->select();
        return $this->fetch('', [
            'list'  =>  $list,
            'list2'  =>  json_encode($list),
        ]);
        return $this->fetch();
    }

    public function index() {
        return $this->fetch();
    }

    public function editImg(){
        if(!request()->isPost()){
            $list = model('config')
                ->where(['group_key'=>'ALLIANCE_IMG'])
                ->select();
            return $this->fetch('', [
                'list' => $list,
            ]);
        }
    }
}
